package com.gujiangbo.oom;

/**
 * @Author: gujiangbo.co
 * @Contact: 646832012@qq.com
 * @Date: 2022/3/12 16:37
 * @Version: 1.0
 * @Description: 堆溢出错误  OutOfMemoryError
 */
public class JavaHeapSpaceDemo {

    public static void main(String[] args) {
       /* String msg = "hello";

        for (; ; ) {
            msg += msg + new Random().nextInt(123123);
        }*/

        byte[] bytes = new byte[80 * 1024 * 1024];//80M
    }
}
